package org.lgiavedoni.android.franq.core.question.imp;

import java.util.List;

import org.lgiavedoni.android.franq.core.contact.Contact;
import org.lgiavedoni.android.franq.core.message.MessageIn;
import org.lgiavedoni.android.franq.service.phone.ContactService;

public class ContactQuestionWithPhoneNumber extends ContactQuestion {

	public ContactQuestionWithPhoneNumber(String text) {
		super(text);
	}

	@Override
	protected List<Contact> getContacts(MessageIn messageIn) {
		List<Contact> l = ContactService.inst.getContactsIgnoreJustMail(ContactService.inst.getContacts());
		l = ContactService.inst.getContactsWithPhone(l);
		return ContactService.inst.getContactsByName(l, messageIn.getText());
	}

}
